import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

// 导入登录注册组件
import Login from '@/views/Login/Login.vue'
import Reg from '@/views/Reg/Reg.vue'

// 声明路由规则
const routes = [
  // 注册的路由
  { path: '/reg',name: 'reg', component: Reg },
  // 登录的路由
  { path: '/login',name: 'login', component: Login },
]

// 创建路由实例对象
const router = new VueRouter({
  routes
})

// 导出路由对象
export default router
